package com.xu.a2019;

import android.content.Context;
import android.widget.TextView;

import java.util.List;

public class TotalAdapter extends BaseListViewAdapter<String> {
    public TotalAdapter(Context context, List<String> list) {
        super(context, list);
    }

    @Override
    protected int setContentView(int position) {
        return R.layout.item_total;
    }

    @Override
    public void convert(BaseViewHolder holder, String s) {
        TextView textView1 = holder.findViewById(R.id.tv_month);
        TextView textView2 = holder.findViewById(R.id.tv_shengyu);
        TextView textView3 = holder.findViewById(R.id.guding);
        TextView textView4 = holder.findViewById(R.id.qita);
        String[] strings = s.split(",");
        textView1.setText(strings[0]);
        textView2.setText(strings[1]);
        textView3.setText(strings[2]);
        textView4.setText(strings[3]);
    }
}
